package dubbo;

import java.util.Scanner;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ImportResource;


/**
 * Hello world!
 *
 */
@SpringBootApplication
@ImportResource(value = { "classpath:dubbo.xml" })
public class App1 {
	public static void main(String[] args) {
		SpringApplication.run(App1.class, args);
		System.out.println("===============================================================================");
		System.out.println("============= APP1 Started ON SpringBoot Success FOR dubbo.server1=============");
		System.out.println("===============================================================================");
		/*这种从控制台获得输入流方式也可以发起阻塞，使得主线程不会结束*/
		/*Scanner sc = new Scanner(System.in);
		sc.nextLine();*/
		synchronized (App1.class) {
			while (true) {
				try {
					App1.class.wait();
				} catch (Throwable e) {
				}
			}
		}
	}
}
